package com.shanling.shanlingcontroller.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;


import com.shanling.shanlingcontroller.ui.fragment.GuideFragment;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by zhuoyue on 2017/8/30.
 */

public class GuidePageAdapter extends FragmentPagerAdapter {

    private List<GuideFragment> guideFragments=new ArrayList<>();

    public GuidePageAdapter(FragmentManager fm, List<GuideFragment> guideFragments) {
        super(fm);
        this.guideFragments = guideFragments;
    }

    @Override
    public Fragment getItem(int position) {
        return guideFragments.get(position);
    }

    @Override
    public int getCount() {
        return guideFragments.size();
    }
}
